Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-request: Feature add linter slang #387

Merged
merged 6 commits into from
Jan 30, 2023

Conversation

retar-kamuy
Copy link
Contributor

Hi, @mshr-h san
Sorry I'm late.

Re-PR by your style and re-commit. Please check this commit.

@mshr-h
Copy link
Owner

mshr-h commented Jan 15, 2023

Thanks! I'll check it maybe in the week.

Copy link
Owner

@mshr-h mshr-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@retar-kamuy
The implementation is straightforward and easy to understand. So I'm okay to merge it. But there might be a need to discuss the arguments passed to the slang command.

@Raamakrishnan
Any comment is welcome.

src/linter/SlangLinter.ts Outdated Show resolved Hide resolved
@retar-kamuy
Copy link
Contributor Author

Hi, @mshr-h san
Thanks for reply.

Those arguments seem optional when linting with slang.
I think they should be in the default of the verilog.linting.slang.arguments section instead of the args because some users don't want to check all the warnings.
We don't need --lint-only option?

I understand your thinking. How about the code below?

  • I thought about leaving --single-unit option alone, but we took into account that some people don't want to set it. Since the option is also set when evaluated by sv-test
  • Slang has two check phases(lint phase -> elaborate phase). With --lint-only option, Elaborate phase is not checked (only lint phase warnings are checked). I would like the user to be able to decide whether to limit the phase.
+ let args: string[] = [];
- args.push('--single-unit');
+ args.push(`-I ${docFolder}`);
+ args = args.concat(this.includePath.map((path: string) => `-I ${path}`));
+ args.push(this.arguments);
+ args.push(`"${docUri}"`);
- args.push('-Weverything', '--strict-driver-checking'); // Slang all warnings check options
```

@mshr-h
Copy link
Owner

mshr-h commented Jan 21, 2023

@retar-kamuy
Ok. Looks good to me.

@mshr-h mshr-h merged commit 040c658 into mshr-h:main Jan 30, 2023
@mshr-h mshr-h mentioned this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants